//
//  RequestManage.h
//  citzenWorkStation
//
//  Created by yang qing on 2018/2/24.
//  Copyright © 2018年 yang qing. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger,HttpRequestMethod) {
    HttpRequestMethodGet = 0,
    HttpRequestMethodPost =1
};
typedef void(^SuccessBlock)(id success);
typedef void(^FailureBlock)(id faiure);
typedef void(^ProgressBlock)(NSInteger percent);
@interface RequestManage : NSObject
- (void)requestWithMethod:(HttpRequestMethod)httpRequestMethod
                     url:(NSString *)url
                    param:(NSDictionary *)param
                  success:(SuccessBlock)successBlock
                  failure:(FailureBlock)failureBlock;
- (void)uploadFileMethod:(NSString *)url
                    param:(NSDictionary *)params
                    file:(id)data
                fileName:(NSString *)fileName
                fileType:(NSString *)fileType
                progress:(ProgressBlock)progressBlock
                  success:(SuccessBlock)successBlock
                  failure:(FailureBlock)failureBlock;
@end
